package com.jugheadzhou.practice.juc;

public class Main {
    public static void main(String[] args) {
        Thread t1 = new Thread(() -> {
            System.out.println(Thread.currentThread().getName() + "::" + Thread.currentThread().isDaemon());
            while (true){}
        }, "t1");
        t1.setDaemon(true);
        // start0();
        // Java是不能开启线程的，底层是调用start0()是一个native方法，由底层的C++方法编写。java无法直接操作硬件。
        t1.start();
        System.out.println("mian thread is end");

        System.out.println("Runtime.getRuntime().availableProcessors() = " + Runtime.getRuntime().availableProcessors());
    }
}
